home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 51
/
051.d81
/
sir tommy
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
203 lines
10 poke53281,0:poke53280,11:printchr$(14);chr$(8);
15 print"[147] [158] [204][207][193][196][211][212][193][210] [208]resents"
20 print" [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
30 print" [154][176][192][174][176][178][174][176][192][174] [176][178][174][176][192][174][176][178][174][176][178][174][176] [174]"
40 print" [173][192][174] [221] [171][178][189] [221] [221] [221][221][221][221][221][221][221][173][178][189]"
50 print" [173][192][189][173][177][189][173][173][189] [177] [173][192][189][173] [189][173] [189] [177]"
60 print" [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
70 print" [154][193] [199]ame of [207]ld [208]atience"
80 print" [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
90 print" 1] [208]lay"
100 print" 2] [201]nstructions"
110 print" 3] [197]xit [208]rogram"
120 print" [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
130 print" [150] by [194]arbara [200]. [211]chulak "
140 print" [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
150 getk$:ifk$=""then150
160 k=val(k$):ifk<1ork>3then150
170 ifk=3thengoto 20000
180 ifk=2thengosub1470:run
190 print"[147] [211]huffling..."
200 fori=14to15:poke781,i:sys59903:next
210 dimt(52),a(52),s(52),w(5,52),wc(5)
220 x=rnd(-ti):js=56320:s=54272
230 fori=0to24:pokes+i,0:next
240 fori=1to4:a(i)=193:next
250 fori=5to8:a(i)=202:next
260 fori=9to12:a(i)=209:next
270 fori=13to16:a(i)=203:next
280 fori=17to20:a(i)=176:next
290 fori=21to24:a(i)=178:next
300 fori=25to28:a(i)=179:next
310 fori=29to32:a(i)=180:next
320 fori=33to36:a(i)=181:next
330 fori=37to40:a(i)=182:next
340 fori=41to44:a(i)=183:next
350 fori=45to48:a(i)=184:next
360 fori=49to52:a(i)=185:next
370 s(0)=160:fori=1to5:w(i,0)=160:next
380 fori=1to5:wc(i)=0:next
390 fori=1to52:t(i)=0:next
400 fori=1to52
410 r=int(rnd(1)*52)+1
420 ift(r)=1then410
430 s(i)=a(r):t(r)=1
440 next
450 :
460 a$="[156][176][192][192][192][174]":b$="[156][221] [146][156][221]":c$="[156][173][192][192][192][189]"
470 print"[147][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]";
480 print"[154] [211]ir [212]ommy ";
490 print"[146][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
500 printtab(10):fori=1to4:printa$;:next
510 print:printtab(10):fori=1to4:printb$;:next
520 print:printtab(10):fori=1to4:printb$;:next
530 print:printtab(10):fori=1to4:printb$;:next
540 print:printtab(10):fori=1to4:printc$;:next
550 print:printtab(5):fori=1to5:printa$;:next
560 print:printtab(5):fori=1to5:printb$;:next
570 print:printtab(5):fori=1to5:printb$;:next
580 print:printtab(5):fori=1to5:printb$;:next
590 print:printtab(5):fori=1to5:printc$;:next
600 print:printtab(7)"s w w w w"
610 print""tab(6)"[159] "
620 printtab(6)" "
630 printtab(6)" "
640 print""tab(30)"[176][192][192][192][192][192][192][174]"
650 printtab(30)"[221][209]=[209]uit[146][221]"
660 printtab(30)"[173][192][192][192][192][192][192][189]"
670 :
680 x=1551:cd=52:pokex,s(cd):pokex+s,3:p=1
690 m=0
700 pokex,peek(x)-128
710 pokex,peek(x)+128
720 getk$
730 ifk$="[145]"thengosub1250
740 ifk$=""thengosub1270
750 ifk$="[157]"thengosub1290
760 ifk$=""thengosub1310
770 ifk$=chr$(13)then820
780 ifk$="q"thenrun
790 pokex,peek(x)-128:fort=1to25:next
800 goto710
810 :
820 gosub1340:m=m+1:ifm=2then870
830 ifpeek(x)=160thengosub1390:goto690
840 ifp<1andp>5thengosub1390:goto690
850 b=peek(x):c=x:pi=p:goto700
860 :
870 ifp=1thengosub1390:goto690
880 ifpi<>1then950
890 ifp<>2andp<>3andp<>4andp<>5then950
900 cd=cd-1:poke1551,s(cd)
910 wc(p)=wc(p)+1:w(p,wc(p))=b
920 poke1551+(p-1)*5,b
930 goto1110
940 :
950 ifb=193andpeek(x)<>160thengosub1390:goto690
960 ifb=178andpeek(x)<>193thengosub1390:goto690
970 ifb=179andpeek(x)<>178thengosub1390:goto690
980 ifb=180andpeek(x)<>179thengosub1390:goto690
990 ifb=181andpeek(x)<>180thengosub1390:goto690
1000 ifb=182andpeek(x)<>181thengosub1390:goto690
1010 ifb=183andpeek(x)<>182thengosub1390:goto690
1020 ifb=184andpeek(x)<>183thengosub1390:goto690
1030 ifb=185andpeek(x)<>184thengosub1390:goto690
1040 ifb=176andpeek(x)<>185thengosub1390:goto690
1050 ifb=202andpeek(x)<>176thengosub1390:goto690
1060 ifb=209andpeek(x)<>202thengosub1390:goto690
1070 ifb=203andpeek(x)<>209thengosub1390:goto690
1080 ifpi=1thencd=cd-1:poke1551,s(cd)
1090 ifpi<>1thenwc(pi)=wc(pi)-1:poke1551+(pi-1)*5,w(pi,wc(pi))
1100 pokex,b
1110 ifpeek(1551)+peek(1556)+peek(1561)+peek(1566)+peek(1571)=160*5then1140
1120 goto690
1130 :
1140 w$="[158][150][156][158]"
1150 fori=1to10:gosub1340
1160 print"";left$(w$,i);" [199]ame [215]on! "
1170 fort=1to25:next
1180 next:fort=1to1000:next
1190 print"[154] [208]ress [156][210][197][212][213][210][206][154] to play again "
1200 getk$:ifk$=""then1200
1210 ifk$=chr$(13)thenrun
1220 print"[147]":end
1230 :
1240 :
1250 x=x-200:p=p-5:ifpeek(x)=32thenx=x+200:p=p+5
1260 return
1270 x=x+200:p=p+5:ifpeek(x)=32thenx=x-200:p=p-5
1280 return
1290 x=x-5:p=p-1:ifpeek(x)=32thenx=x+5:p=p+1
1300 return
1310 x=x+5:p=p+1:ifpeek(x)=32thenx=x-5:p=p-1
1320 return
1330 :
1340 pokes+24,15:pokes+5,9
1350 pokes+4,17:pokes+1,28:pokes,214
1360 fort=1to75:next
1370 pokes+4,16:return
1380 :
1390 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
1400 print" [221][201]llegal [205]ove![146][221]"
1410 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
1420 fort=1to1000:next
1430 print" "
1440 fori=1to2:print" ":next
1450 return
1460 :
1470 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
1480 print"[221][159] [201]nstructions for [211]ir [212]ommy [146][221]";
1490 print"[171]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[179]";
1500 print"{$7d}[156] {$7d}";
1510 print"{$7d}[156] [153]Sir Tommy or Old Patience is a {$7d}";
1520 print"[221] one-deck solitaire game. [212]he object [221]";
1530 print"[221] of the game is to move the four aces [221]";
1540 print"[221] to the four foundations and then to [221]";
1550 print"[221] build them up in sequence regardless [221]";
1560 print"[221] of suit. [221]";
1570 print"[221] [221]";
1580 print"[221] [195]ards from the stock pile ([153]s) [221]";
1590 print"[221] should be played to a foundation if [221]";
1600 print"[221] at all possible or to any of the [221]";
1610 print"[221] four waste piles ([153]w). [212]he top card [221]";
1620 print"[221] of each waste pile may be played to [221]";
1630 print"[221] any foundation at any time but may [221]";
1640 print"[221] not be moved to another waste pile. [221]";
1650 print"[221] [212]he game is won if all cards can be [221]";
1660 print"[221] placed on the foundations. [221]";
1670 print"[221] [221]";
1680 print"[221] [221]";
1690 print"[171]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[179]";
1700 print"{$7d}[156] Press RETURN [